<template>
	<view class="accountInformationContent">
		<view class="upper">
			<CommonNavBar :title="title"  ></CommonNavBar>  
		</view>
		<view class="centre">
			<view class="li" v-for="(list,index) in subjectInformationData" :key="index">
				<view class="h1">{{ index+1 }}.{{ list.taskConcrete }}</view>
				<view class="h2">任务项分类描述:{{ list.taskStress }}</view>
				<view class="h2">任务项检查说明描述:{{ list.fillingContext }}</view>
				<view class="h2">年度:{{ list.yearInfo }}</view>
				<view class="h2">季度:{{ list.quarter }}</view>
				<view class="h2">填写时间:{{ list.fillingTime }}</view>
				<view class="h2">督导任务明细编码:{{ list.detailCode }}</view>
				<view class="h2">是否符合要求:{{ list.required === '1' ? '是' :
												list.required === '0' ? '否' :
												list.required === '2' ? '不适用' : '' }}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import CommonNavBar from '@/components/CommonNavBar.vue'
	export default {
		components: {
			CommonNavBar
		}, 
		data() {
			return {
				title: '包保信息',
				subjectInformationData: {},
			}
		},
		computed:{
			
		}, 
		onLoad(options) {
			this.initData(options.bbId);
		},
		methods: {
			goBack() {
				uni.navigateBack();
			},
			async initData(id) {
				console.log('id', id)
				uni.showLoading({
					title:'获取数据中',
					mask: true
				})
				let data = {
					id: id
				}
				try {
					const res = await uni.$api.getBaobaoDetailListById(data);
					console.log("页面初始化数据",res.data.data);
					this.subjectInformationData = res.data.data 
				} catch (error) {
					console.error(error)
				}
				uni.hideLoading();
			},
		}
	}
</script>

<style lang="scss">
	.accountInformationContent {
		background: #F9F9F9;
		// height: calc(100vh - 195rpx);

		.upper {
			position: fixed;
			z-index: 1;
			top: 0;
			left: 0;
			width: 100%;

			.title {
				background: url('../../static/img/inspectBg.png');
				background-size: cover;
				width: 100%;
				height: 115rpx;
				line-height: 115rpx;
				position: relative;
				display: flex;
				justify-content: center;

				.arrow {
					position: absolute;
					left: 33rpx;
					top: 50%;
					transform: translate(0%, -50%);
					width: 100rpx;
					height: 100rpx;

					&::before {
						display: block;
						content: "";
						position: absolute;
						top: 50%;
						left: 0%;
						width: 20rpx;
						height: 20rpx;
						border-left: 1px solid #fff;
						border-top: 1px solid #fff;
						transform: translate(0%, -50%) rotate(-45deg);
					}
				}

				text {
					font-size: 30rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #FFFFFF;
					letter-spacing: 1px;
				}
			}
		}

		.centre {
			margin: 125rpx 0 0 0;
			padding: 0 17.5rpx 50rpx 17.5rpx;
			height: calc(100vh - 125rpx);
			overflow-x: hidden;
		
			.li {
				background: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 100%);
				box-shadow: 0rpx 8rpx 15rpx 0rpx rgba(0, 0, 0, 0.05);
				border-radius: 15rpx;
				padding: 30rpx 30rpx 21rpx 28rpx;
				position: relative;
				margin: 13rpx 20rpx 0;
		
				.float {
					position: absolute;
					top: 0;
					right: 0;
					// width: 97rpx;
					padding: 0 10rpx;
					height: 46rpx;
					line-height: 46rpx;
					background: linear-gradient(180deg, #5DA1FF 0%, #0054C9 100%);
					border-radius: 0rpx 11rpx 0rpx 11rpx;
					font-size: 18rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #FFFFFF;
					text-align: center;
				}
		
				.h1 {
					font-size: 24rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #333333;
					line-height: 1;
					margin: 0 0 14rpx 0;
				}
		
				.h2 {
					font-size: 19rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #666666;
					line-height: 1;
					margin: 12rpx auto;
					
					text {
						color: #00BE8C;
					}
					
					&.no {
						
						text {
							color: #FF3829;
						}
					}
				}
		
				.order {
					width: 121rpx;
					height: 46rpx;
					line-height: 46rpx;
					text-align: center;
					background: #FF594C;
					border-radius: 9rpx;
					font-size: 18rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #FFFFFF;
					margin: 16rpx 0 0 0;
					position: relative;
					
					&.yes {
						background: #00BE8C;
					}
					
					.arrow {
						width: 0;
						height: 0;
						border-top: 4px solid transparent;
						border-bottom: 4px solid transparent;
						border-left: 5px solid #fff;
						position: absolute;
						top: 50%;
						right: 8rpx;
						-webkit-transform: translate(-50%, -50%);
						transform: translate(-50%, -50%);
					}
				}
			}
		}
	}
</style>